package com.hooya.fa.eu.biz.dao.repository.impl;

import com.hooya.fa.eu.biz.dao.entity.ProfitCheck;
import com.hooya.fa.eu.biz.dao.mapper.ProfitCheckMapper;
import com.hooya.fa.eu.biz.dao.repository.ProfitCheckRepository;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Description 1
 * @Author : Zongz
 * @Copyright Copyright (c) 豪雅集团
 * @Create 2024/1/11
 * @Version 1.0.0
 */
@Slf4j
@Repository
@AllArgsConstructor
public class ProfitCheckRepositoryImpl implements ProfitCheckRepository {

    private final ProfitCheckMapper profitCheckMapper;

    @Override
    public int batchSave(List<ProfitCheck> profitCheckList) {
        int i = 0;
        for (ProfitCheck profitCheck : profitCheckList) {
            i += profitCheckMapper.insert(profitCheck);
        }
        return i;
    }
}
